From: Georges Basile Stavracas Neto Date: Fri, 29 Nov 2019 19:05:12 +0000 (-0300) Subject: unlockDialog: Use just the counter to format notifications X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~777^2^2~115 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=05c918dc1aa3db30b1030496979ae54e09761a57;p=gnome-shell.git unlockDialog: Use just the counter to format notifications https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872 --- diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js index 2aaaf4de1..9335e015e 100644 --- a/js/ui/unlockDialog.js +++ b/js/ui/unlockDialog.js @@ -71,13 +71,6 @@ var NotificationsBox = GObject.registerClass({ this.visible = this._notificationBox.visible; } - _makeNotificationCountText(count, isChat) { - if (isChat) - return ngettext('%d new message', '%d new messages', count).format(count); - else - return ngettext('%d new notification', '%d new notifications', count).format(count); - } - _makeNotificationSource(source, box) { let sourceActor = new MessageTray.SourceActor(source, SUMMARY_ICON_SIZE); box.add_child(sourceActor); @@ -93,7 +86,7 @@ var NotificationsBox = GObject.registerClass({ let count = source.unseenCount; let countLabel = new St.Label({ - text: this._makeNotificationCountText(count, source.isChat), + text: `${count}`, style_class: 'unlock-dialog-notification-count-text', }); textBox.add(countLabel); @@ -239,7 +232,7 @@ var NotificationsBox = GObject.registerClass({ this._showSource(source, obj, obj.sourceBox); } else { let count = source.unseenCount; - obj.countLabel.text = this._makeNotificationCountText(count, source.isChat); + obj.countLabel.text = `${count}`; } obj.sourceBox.visible = obj.visible && (source.unseenCount > 0);